package nowcoder.other.codem.a;

import java.util.Scanner;

/**
 * @author fance
 * @date 18-6-9 下午3:02
 */
public class Main {
    private static  int[][] next = {{0,-1},{0,1},{-1,0},{1,0}};

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        String k = scanner.next();
        double res = (double)a / b;
        String s = String.format("%.100f",res);
        String last = s.substring(s.indexOf(".") + 1);
        StringBuilder stringBuilder = new StringBuilder(last);
        for (int i = 0; i < 100; i++) {
            stringBuilder.append("0");
        }
        if (stringBuilder.toString().contains(k)) {
            System.out.println(stringBuilder.toString().indexOf(k) + 1);
        } else {
            System.out.println(-1);
        }

    }


}
